<div class="role-mapping-content">
    <div class="row entity-swapper">
        <div class=" col-md-4 col-md-offset-1">
            <div class="btn-group" ng-model="entityType" bs-radio-group>
                <label class="btn btn-default"><input type="radio" class="btn btn-default" value="user"> Users</label>
                <label class="btn btn-default"><input type="radio" class="btn btn-default" value="group"> Groups</label>
            </div>

        </div>
    </div>
    <!--First Row - RoleMapping Header-->
    <div class="row">
        <div class="col-md-3 col-md-offset-1">
            <div class="mapping-header">
                <div class="mapping-title">{{titleOfTable}}</div>
                <div class="mapping-search">
                    <input type="search" ng-model="entityFilter"/>
                </div>
            </div>
        </div>
        <div class="col-md-3 col-md-offset-1">
            <div class="mapping-header">
                <div class="mapping-title">Roles</div>
                <div class="mapping-search">
                    <input type="search" ng-model="assignmentFilter"/>
                </div>
            </div>
        </div>

    </div>
    <!--Second Row - RoleMapping Tables-->
    <div class="row entity-mapping">
        <!--Group Detail Info-->
        <div class="col-md-1">

        </div>
        <!--Table with Groups-->
        <div class="col-md-3 table-grid">
            <table class="entity-mapping-table" ondblclick="">
                <tr ng-repeat="entity in entities |ldapEntitySearch:entityFilter:selectedEntities track by entity.name"
                    ng-class="isEntitySelected(entity) && 'selected'">
                    <td><input type="checkbox" checklist-model="selectedEntities" checklist-value="entity"/></td>
                      <td class="entity-name-col"  ng-click="selectEntity(entity)">  {{entity.name}}</td>
                     </tr>
            </table>
        </div>
        <!--Table with Roles-->
        <div class="col-md-3 col-md-offset-1 table-grid">
            <table class="entity-mapping-table">
                <tr ng-repeat="assignment in roleAssignments|ldapAssignmentSearch:assignmentFilter:getGroupsAssignments()"
                    ng-click="selectAssignment(assignment)" ng-class="isAssignmentSelected(assignment) && 'selected'">
                    <td>{{assignment.name}}</td>
                </tr>
            </table>
        </div>
    </div>
    <!--Third Row - Assign role to Group-->

    <div class="row mapping-assign-row">
        <hr/>
        <div class="col-md-11 assignmentSubmit">
            <div ng-show="selectedEntities.length > 0 && selectedAssignment!='' && (!classif.global || classif.region)">
               <p> Assign role <span class="text-role">{{selectedAssignment.name}}</span>
                to <span class="text-group">{{selectedEntitiesToString()}}</span>
               </p>
                <p>{{selectedClassificationToString()}}</p>
                <input class="button button-text button-low primary" type="button" value="Assign"
                       ng-click="confirmAssignment()"/>
            </div>
        </div>
        <hr/>
    </div>



</div>
<div ng-show="confirmPopup" confirmation-popup></div>
